package com.jimikongjian.service.base;

import com.jimikongjian.models.Notification;
import com.jimikongjian.models.ResponseMessage;

/**
 * Created by fuxiuyang on 17/3/15.
 */
public interface INotificationService {


    /**
     * 创建一个通知消息
     * @param notification
     * @return
     */
    public ResponseMessage createNotification(Notification notification);


    /**
     * 查询从第start位子到start+length位子的所有的通知
     * @param notifiedId
     * @param start
     * @param length
     * @return
     */
    public ResponseMessage selectNotificationListByNotifiedId(int notifiedId, int start, int length);


    /**
     * 查询从第start位子到start+length位子的所有的未读通知
     * @param notifiedId
     * @param start
     * @param length
     * @return
     */
    public ResponseMessage selectUnreadNotificationListByNotifiedId(int notifiedId, int start, int length);

    /**
     * 查询被通知者未查看消息的条数
     * @param notifiedId
     * @return
     */
    public ResponseMessage selectUnreadCountByNotifiedId(int notifiedId);


    /**
     * 更新一个通知消息
     * @param notification
     * @return
     */
    public ResponseMessage updateNotification(Notification notification);


}
